package com.tang.campus_market.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.tang.campus_market.entity.Order;

import java.util.List;
import java.util.Map;

/**
 * @ Author     ：Marine.Li
 * @ Date       ：Created in 14:20 2021/8/5
 * @ Description：
 * @ Modified By：
 * @Version: $
 */

public interface OrderService {
    
    List<Order> queryList(Map<String,Object> map);
    
    Page<Order> selectOrderPage(Integer page, Integer rows);
    
    Order getById(int orderId);

    Order getByGoodId(int goodId);
    
    int delete(int orderId);
    
    List<Order> getOrderByCustomerId(int customerId);

    List<Order> getOrderBySellerId(int sellerId);
    
    List<Order> getSellerOtherOrders(int sellerId, int orderId);
    
    List<Order> getCustomerOtherOrders(int customerId, int orderId);
    
    Integer cancelOrder(int goodId, int orderId);
    
    Integer updateOrder(int orderId, int statusId);
    
    Integer createOrder(Order order);
    
    Integer complete(Integer orderId);

    //查询所有订单
    List<Order> findAll();

    //根据订单id删除订单
    void deleteById(Integer id);

    Order selectById(Integer orderId);
}
